<%--用户待审核笔记界面--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="dao.ImplementNote" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="pojo.Note" %><%--
  Created by IntelliJ IDEA.
  User: tangms
  Date: 2022/4/4
  Time: 9:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<style>
    *{
        margin: 0px;
        padding: 0px;
        box-sizing: border-box;
    }
    .title_left{
        margin-left: 420px;
    }
    .back,.delete{
        margin-left: 790px;
    }
    .content_left{
        border:1px solid black;
        width: 440px;
        margin-left: 420px;
        height: 100px;
        margin-bottom: 20px;
    }
    .type{
        margin-left: 420px;
    }
</style>
<script>
    function deleteNote(id){
        if(confirm("您确定删除吗？")){
            location.href="${pageContext.request.contextPath}/deleteNoteServlet?id="+id;
        }
    }
</script>
<body>
<h3 align="center">个人待审核笔记</h3>
<a href="allAreas.jsp" type="submit" class="back">返回首页</a>
<%
    String usename= (String) session.getAttribute("usename");
    ImplementNote implementNote=new ImplementNote();
    ArrayList<Note> checkednotes=new ArrayList<Note>();
    checkednotes=implementNote.user_checkednote(usename);
    request.setAttribute("checkednotes",checkednotes);
%>
<c:forEach items="${checkednotes}" var="note" varStatus="s">
    <form>
        <table>
            <tr>
                <td>
                    <h5 class="title_left" name="title">${note.title}</h5>
                    <h5 class="type">${note.type}</h5>
                 <a href="javascript:deleteNote(${note.id});" class="delete" type="submit">删除</a>
                   <c:if test="submit.onclick"></c:if>
                    <p class="content_left" name="content">${note.content}</p>
                </td>
            </tr>
        </table>
    </form>
</c:forEach>
</body>
</html>
